package huffmanTree;

import io.netty.buffer.ByteBuf;

import java.util.Iterator;
import java.util.List;
import java.util.Map;

/**
 * @author Aaron
 * @desc
 * @createTime 2021/12/10 21:18
 * @since
 */
public interface HuffmanTree<T> {

    Map<T,String> getCompressMappingResult();

    int getLastBitIndex();

    int calculateCompressResultLength();

    byte[] getCompressResult();

    HuffmanTree<T> buildTree();

    Map<T, Long> getValueFrequency();

    Iterator<T> iterator();

    Iterator<T> testIterator(ByteBuf byteBuf);

    List<HuffmanNode<T>> getAllHuffmanTreeList();

    void addValue(T value);

    void deleteValue(T node);

    void addValueList(List<T> valueList);

    void deleteValueList(List<T> valueList);

    void addHuffmanTree(HuffmanTree<T> huffmanTree);

    List<T> getValueList();

}
